package com.training.java.core.collections.TreeSet;


import java.util.Set;
import java.util.TreeSet;

public class NamesTreeSet {

	public static void main(String[] args) {
		Set<String> names = new TreeSet<String>();

		names.add("Raji");
		names.add("Henry");
		names.add("Sushil");
		names.add("Ravi");
		names.add("Satya");
		names.add("Mira");
		names.add("Siva");
		names.add("Almas");
		names.add("Peng");
		names.add("Suneetha");
		// In the case of TreeSet, it prints in
		// the natural order of values. For Strings, the order is alphabetical.
		for (String aName : names) {
			System.out.println("aName = " + aName);

		}

	}
}
